package jihe;

public class Category {
    private int id;    //类别编号
    private String name;    //类别名称
    public Category(int id,String name)
    {
        this.id=id;
        this.name=name;
    }
    public String toString()
    {
        return "所属分类："+this.name;
    }
    //上面两个属性的setXxx()和getXxx()方法
    public int getId()
    {
        return id;
    }
    public void setId(int id)
    {
        this.id=id;
    }
    public String getName()
    {
        return name;
    }
    public void setName(String name)
    {
        this.name=name;
    }
}
